/* Nicholas Lineback and Jeremey Cowan
   COSC 530 Computer Architecture
   Project 1
   Cache Simulator
   2011-10-20
*/
#pragma once
#include <iostream>
#include <getopt.h>
#include <stdio.h>
#include <stdlib.h>
#include <string>
#include <fstream>
#include <vector>
#include <sstream>
#include <exception>
struct mem_instruction
{
  int address;
  int read_write;
};
class fileParseException: public std::exception
{
 protected:
  char* msg;
 public:
  fileParseException(const char* msg)
    {
      this->msg = (char*)msg;
    } 
  virtual const char* what() 
  {
    return this->msg;
  }
};
void usage();
void parseArgs(int, char**);
void parseFile(std::vector<mem_instruction>&);

extern unsigned int gWordSize;
extern unsigned int gBlockSize;
extern unsigned int gNumBlocks;
extern unsigned int gAssociativity;
extern unsigned int gHitTime;
extern unsigned int gMainMemTime;
extern unsigned int gL2Size;
extern unsigned int gL3Size;
extern unsigned int gL2Time;
extern unsigned int gL3Time;
extern char* gFileName;
extern bool gVerbose;
